﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


/// <summary>
/// 控制摄像机旋转组件
/// </summary>
public class CameraRotater : MonoBehaviour
{

    public bool isStartRotate = false;



    void Update()
    {
        if (isStartRotate == true)
        {
            transform.Rotate(Vector3.right, 2f);
        }
    }

    /// <summary>
    /// 开始旋转
    /// </summary>
    public void StartRotate()
    {
        isStartRotate = true;
    }

    /// <summary>
    /// 停止旋转
    /// </summary>
    public void StopRotate()
    {
        isStartRotate = false;
    }
}
